package com.hms.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;

import org.hibernate.annotations.GenericGenerator;

/**
 * 基础BaseEntity <br>
 * 类详细说明.
 * <p>
 * Copyright: Copyright (c) 2013-4-13 上午10:22:50
 * <p>
 * Company: 北京宽连十方数字技术有限公司
 * <p>
 * 
 * @author wangpz@c-platform.com
 * @version 1.0.0
 */
@MappedSuperclass
public class BaseEntity implements Serializable {

	/** serialVersionUID */
	private static final long serialVersionUID = 1L;

	// ID
	private String id;

	// 添加人
	private Long createUserId;

	// 创建时间
	private Date createTime;

	// 修改时间
	private Date modifyTime;

	@Id
	@Column(length = 32, nullable = true)
	@GeneratedValue(generator = "uuid")
	@GenericGenerator(name = "uuid", strategy = "uuid")
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Column(updatable = false)
	public Long getCreateUserId() {
		return createUserId;
	}

	public void setCreateUserId(Long createUserId) {
		this.createUserId = createUserId;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}
}
